Skip to content

refactor: single-source the host vocabularies shared with the Workbench - #14

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
refactor/shared-host-vocabularies
Aug 28, 2026
Merged

refactor: single-source the host vocabularies shared with the Workbench#14
ScriptedAlchemy merged 2 commits into
mainfrom
refactor/shared-host-vocabularies

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Stacked on feat(adapters): add a first-class cursor compile target #13 (base branch: feat/cursor-host-adapter) — this is the "shared server/browser vocabularies" hygiene item: adding a host previously touched ~10 files of duplicated literal unions, sets, and label tables.
  • New browser-safe host-contracts/native-hosts.ts owns the native host list and labels; the playground service/catalog/request contracts, eval harness names, and the Workbench host selector and zod schema all derive from it.
  • MCP App profile ids, labels, and versions now come only from the existing mcp-app-profile-descriptors.ts registry (dropped four parallel copies, including the Workbench label table).
  • The MCP session target union (claude | codex | cursor | portable) is now one runtime export from contracts/mcp-session.ts, consumed by the Workbench route client and session controller gates.
  • No behavior change: every list keeps its previous members and ordering; existing import paths keep working through re-exports.

Test plan

  • pnpm test:unit — 1664 passed, 0 failed
  • pnpm typecheck — clean (root + workbench)
  • pnpm lint — clean
  • PR CI

Adding a host previously meant re-declaring the same literal unions,
sets, and label tables across compiler services and Workbench clients.
The native host list and labels now live in one browser-safe
host-contracts module that the playground service, catalog, request
contracts, eval harness names, and Workbench selectors all derive from;
MCP App profile ids, labels, and versions come from the existing
descriptor registry instead of four parallel copies; and the MCP
session target union is one contracts export consumed by both Workbench
gates. Behavior is unchanged - every list keeps its previous members
and ordering.
@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: de9eae3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@14
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@14

commit: de9eae3

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44fff25673

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3 to +6
* Bundle can drive. Every server-side host set, request union, and Workbench
* selector derives from this list so adding a native host is one edit.
*/
export const NATIVE_HOSTS = Object.freeze(['claude', 'codex'] as const);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive the remaining playground host gates from this list

When a third native host is added here, the catalog and browser schema will accept and display it, but playground-model.ts:182, playground-routes.ts:190, and the service/catalog decoders still explicitly allow only Claude and Codex. The Workbench will consequently clear the advertised selection or the route will reject the generated request, so this is not yet the promised single edit point; those runtime gates should use the shared vocabulary or a shared predicate too.

Useful? React with 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy changed the base branch from feat/cursor-host-adapter to main August 28, 2026 21:02
@ScriptedAlchemy
ScriptedAlchemy merged commit 7279073 into main Aug 28, 2026
16 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the refactor/shared-host-vocabularies branch September 3, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant